package net.j4love.json.gson.example.quickstart;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import java.util.Map;

/**
 * @author He Peng
 * @create 2017-05-21 18:58
 * @update 2017-05-21 18:58
 * @updatedesc : 更新说明
 * @see
 */
public class GsonDeserialize {

    public static void main(String[] args) {

        String text = "{\n" +
                "  \"爱好\" : \"出现在各类九年制义务教育教材中\",\n" +
                "  \"name\" : \"小明\",\n" +
                "  \"格言\" : \"我也很无奈啊\",\n" +
                "  \"年龄\" : 12,\n" +
                "  \"性别\" : \"男\"\n" +
                "}";
        Gson gson = new GsonBuilder().create();
        Map map = gson.fromJson(text, Map.class);
        System.out.println(map);

    }
}
